<?php

namespace App\Kuafu\CouponExt\Channel;

use App\Kuafu\Base\Service\BaseService;

abstract class CouponExtBaseService extends BaseService implements CouponExtInterface
{

    /**
     * 接口返回通用处理
     * @param bool $status
     * @param string $code
     * @param string $msg
     * @param array $oriData
     * @return array
     */
    protected function returnFormatData(bool $status, string $code, string $msg, array $oriData): array
    {
        $returnObj = new CouponExtReturn();
        $returnObj->setStatus($status);
        $returnObj->setCode($code);
        $returnObj->setMsg($msg);
        $returnObj->setOriData($oriData);

        return $returnObj->getResultArray();
    }
}
